package pe.com.certicom.moviles.model.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import pe.com.certicom.moviles.model.beans.ActaEntrega;
import pe.com.certicom.moviles.model.beans.ActaEntregaExample;

import com.ibatis.sqlmap.client.SqlMapClient;


@Repository
public class ActaEntregaDAOImpl extends SqlMapClientDaoSupport implements ActaEntregaDAO {

    /**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public ActaEntregaDAOImpl() {
		super();
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int countByExample(ActaEntregaExample example) {
		Integer count = (Integer) getSqlMapClientTemplate().queryForObject(
				"acta_entrega.ibatorgenerated_countByExample", example);
		return count;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int deleteByExample(ActaEntregaExample example) {
		int rows = getSqlMapClientTemplate().delete(
				"acta_entrega.ibatorgenerated_deleteByExample", example);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int deleteByPrimaryKey(Long idActaEntrega) {
		ActaEntrega key = new ActaEntrega();
		key.setIdActaEntrega(idActaEntrega);
		int rows = getSqlMapClientTemplate().delete(
				"acta_entrega.ibatorgenerated_deleteByPrimaryKey", key);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public void insert(ActaEntrega record) {
		getSqlMapClientTemplate().insert("acta_entrega.ibatorgenerated_insert",
				record);
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public void insertSelective(ActaEntrega record) {
		getSqlMapClientTemplate().insert(
				"acta_entrega.ibatorgenerated_insertSelective", record);
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	@SuppressWarnings("unchecked")
	public List<ActaEntrega> selectByExampleWithBLOBs(ActaEntregaExample example) {
		List<ActaEntrega> list = getSqlMapClientTemplate().queryForList(
				"acta_entrega.ibatorgenerated_selectByExampleWithBLOBs",
				example);
		return list;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	@SuppressWarnings("unchecked")
	public List<ActaEntrega> selectByExampleWithoutBLOBs(
			ActaEntregaExample example) {
		List<ActaEntrega> list = getSqlMapClientTemplate().queryForList(
				"acta_entrega.ibatorgenerated_selectByExample", example);
		return list;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public ActaEntrega selectByPrimaryKey(Long idActaEntrega) {
		ActaEntrega key = new ActaEntrega();
		key.setIdActaEntrega(idActaEntrega);
		ActaEntrega record = (ActaEntrega) getSqlMapClientTemplate()
				.queryForObject(
						"acta_entrega.ibatorgenerated_selectByPrimaryKey", key);
		return record;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByExampleSelective(ActaEntrega record,
			ActaEntregaExample example) {
		UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByExampleSelective", parms);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByExampleWithBLOBs(ActaEntrega record,
			ActaEntregaExample example) {
		UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByExampleWithBLOBs", parms);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByExampleWithoutBLOBs(ActaEntrega record,
			ActaEntregaExample example) {
		UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByExample", parms);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByPrimaryKeySelective(ActaEntrega record) {
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByPrimaryKeySelective",
				record);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByPrimaryKeyWithBLOBs(ActaEntrega record) {
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByPrimaryKeyWithBLOBs",
				record);
		return rows;
	}

	/**
	 * This method was generated by Apache iBATIS ibator. This method corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	public int updateByPrimaryKeyWithoutBLOBs(ActaEntrega record) {
		int rows = getSqlMapClientTemplate().update(
				"acta_entrega.ibatorgenerated_updateByPrimaryKey", record);
		return rows;
	}

	/**
	 * This class was generated by Apache iBATIS ibator. This class corresponds to the database table acta_entrega
	 * @ibatorgenerated  Fri Nov 08 14:15:34 COT 2013
	 */
	private static class UpdateByExampleParms extends ActaEntregaExample {
		private Object record;

		public UpdateByExampleParms(Object record, ActaEntregaExample example) {
			super(example);
			this.record = record;
		}

		public Object getRecord() {
			return record;
		}
	}

	@Autowired
	public void createSqlMapClient(SqlMapClient sqlMapClient){
	   setSqlMapClient(sqlMapClient);
	}
}